/*
 * Project: Sudoku Explainer
 * Copyright (C) 2006-2007 Nicolas Juillerat
 * 
 * Project: Sudoku Hint Engine for Android
 * Copyright (C) 2010-2013 Emanuel Moecklin
 * 
 * Available under the terms of the Lesser General Public License (LGPL)
 */
package com.onegravity.sudoku.solver.util;

import java.io.Serializable;

import com.onegravity.sudoku.solver.data.Cell;

/**
 * A link between either two potential values (candidates) of two cells or two cells in general.
 * The latter case is identified by a zero value (srcValue=0 and/or dstValue=0)
 */
public class Link implements Serializable {

	private static final long serialVersionUID = -352975665830784092L;
	
	private final Cell srcCell;
    private final int srcValue;
    private final Cell dstCell;
    private final int dstValue;

    public Link(Cell srcCell, int srcValue, Cell dstCell, int dstValue) {
        this.srcCell = srcCell;
        this.srcValue = srcValue;
        this.dstCell = dstCell;
        this.dstValue = dstValue;
    }

    public Cell getSrcCell() {
        return srcCell;
    }

    public int getSrcX() {
        return srcCell.getX();
    }

    public int getSrcY() {
        return srcCell.getY();
    }

    public int getSrcValue() {
        return srcValue;
    }

    public Cell getDstCell() {
        return dstCell;
    }

    public int getDstX() {
        return dstCell.getX();
    }

    public int getDstY() {
        return dstCell.getY();
    }

    public int getDstValue() {
        return dstValue;
    }

}
